<?php

 /**
  * @package JooS
  * @subpackage Syntax_PHPackager
  */

  require_once "JooS/Syntax/Complex/Transition.php";

 /**
  * Variable_Path ::= [ name, { "/", name } ];
  */
  class JooS_Syntax_PHPackager_Variable_Path extends JooS_Syntax_Complex_Transition {
    /**
     * @return JooS_Syntax_Complex_Repetition
     */
    public function createRule() {
      require_once "JooS/Namespace.php";

      $parser = $this->getParser();

      return $parser->createSyntax("Complex_Repetition", $parser->createSyntax("Complex_Concatenate", array(
        $parser->createSyntax("Common_Name"),
        $parser->createSyntax("Complex_Repetition", $parser->createSyntax("Complex_Concatenate", array(
          $parser->createSyntax("Simple_Symbol", JooS_Namespace::DELIMITER),
          $parser->createSyntax("Common_Name")
        )))
      )), 1);
    }
  }
